package cc.realxyq.kewei.coupon.controller;

import cc.realxyq.kewei.common.utils.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 一句话描述该类的功能
 *
 * @author : Hankewei
 * @version : v1.0
 * @createTime : [2021/6/20 2:13]
 */
@RestController
@RefreshScope
public class NacosConfigController {

    //@Value("${user.name}")
    String userName;

    //@Value("${user.age}")
    int age;

    @GetMapping("/coupon/nacos/config/user")
    public R user(){
        return R.ok().put("name",userName).put("age",age);
    }
}
